Typically, data stored in a persistent database takes longer to retrieve than data stored in a random access memory (RAM) caching system. Caches can be used to store data recently retrieved from a database. Subsequent user requests for the same data can be retrieved more quickly from cache and also lightens the database load.
For a large social networking service that uses multiple data centers to support requests for data from millions of users, or in one case, billions of users, it is important to maintain cache consistency across data centers. Inconsistent data caching can result in users being served stale data, which results in a non-ideal user experience. Further, if inconsistent data is found in the system, it can be an indication of a larger software and/or hardware problem. Thus, it would be beneficial to have a method available for detecting cache inconsistencies.